
package com.purchase.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.purchase.service.IUserAccessService;
import com.purchase.util.RequestForm;
import com.purchase.util.ResponseForm;


/**
 * @ClassName: WxuserPageController.java
 * @Description: 后台用户管理模块
 */
@Controller
@RequestMapping("/wxUser")
public class WxuserPageController {

	@Resource
	IUserAccessService userAccessService;
	
	/**
	 * 获取用户列表
	 * @param ResponseForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/wxUserList", method = RequestMethod.POST)
	public ResponseForm wxUserList(@RequestBody RequestForm param) {
		return userAccessService.wxUserList(param);
	}
	
	/**
	 * 用户列表 中设置会员或者代购
	 * @param ResponseForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/setMember", method = RequestMethod.POST)
	public ResponseForm setMember(@RequestBody RequestForm param) {
		return userAccessService.setMember(param);
	}
	
	/**
	 * 用户列表 会员升级代购
	 * @param ResponseForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/setMemberEdit", method = RequestMethod.POST)
	public ResponseForm setMemberEdit(@RequestBody RequestForm param) {
		return userAccessService.setMemberEdit(param);
	}
	
}
